home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / share / aclocal-1.6 / lispdir.m4 < prev    next >
Encoding:
M4 Source File  |  2005-10-16  |  2.4 KB  |  64 lines

  1. ## ------------------------                           -*- Autoconf -*-
  2. ## Emacs LISP file handling
  3. ## From Ulrich Drepper
  4. ## Almost entirely rewritten by Alexandre Oliva
  5. ## ------------------------
  6.  
  7. # Copyright 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
  8.  
  9. # This program is free software; you can redistribute it and/or modify
  10. # it under the terms of the GNU General Public License as published by
  11. # the Free Software Foundation; either version 2, or (at your option)
  12. # any later version.
  13.  
  14. # This program is distributed in the hope that it will be useful,
  15. # but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17. # GNU General Public License for more details.
  18.  
  19. # You should have received a copy of the GNU General Public License
  20. # along with this program; if not, write to the Free Software
  21. # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
  22. # 02111-1307, USA.
  23.  
  24. # serial 5
  25.  
  26. # AM_PATH_LISPDIR
  27. # ---------------
  28. AC_DEFUN([AM_PATH_LISPDIR],
  29. [AC_ARG_WITH(lispdir,
  30.  [  --with-lispdir          Override the default lisp directory ],
  31.  [ lispdir="$withval"
  32.    AC_MSG_CHECKING([where .elc files should go])
  33.    AC_MSG_RESULT([$lispdir])],
  34.  [
  35.  # If set to t, that means we are running in a shell under Emacs.
  36.  # If you have an Emacs named "t", then use the full path.
  37.  test x"$EMACS" = xt && EMACS=
  38.  AC_CHECK_PROGS(EMACS, emacs xemacs, no)
  39.  if test $EMACS != "no"; then
  40.    if test x${lispdir+set} != xset; then
  41.      AC_CACHE_CHECK([where .elc files should go], [am_cv_lispdir],
  42.        [# If $EMACS isn't GNU Emacs or XEmacs, this can blow up pretty badly
  43.   # Some emacsen will start up in interactive mode, requiring C-x C-c to exit,
  44.   #  which is non-obvious for non-emacs users.
  45.   # Redirecting /dev/null should help a bit; pity we can't detect "broken"
  46.   #  emacsen earlier and avoid running this altogether.
  47.   AC_RUN_LOG([$EMACS -batch -q -eval '(while load-path (princ (concat (car load-path) "\n")) (setq load-path (cdr load-path)))' </dev/null >conftest.out])
  48.         am_cv_lispdir=`sed -n \
  49.        -e 's,/$,,' \
  50.        -e '/.*\/lib\/\(x\?emacs\/site-lisp\)$/{s,,${libdir}/\1,;p;q;}' \
  51.        -e '/.*\/share\/\(x\?emacs\/site-lisp\)$/{s,,${datadir}/\1,;p;q;}' \
  52.        conftest.out`
  53.        rm conftest.out
  54.        if test -z "$am_cv_lispdir"; then
  55.          am_cv_lispdir='${datadir}/emacs/site-lisp'
  56.        fi
  57.      ])
  58.      lispdir="$am_cv_lispdir"
  59.    fi
  60.  fi
  61. ])
  62. AC_SUBST(lispdir)
  63. ])# AM_PATH_LISPDIR
  64.